package edu.bu.cs673.superkids123.children.controller;

import edu.bu.cs673.superkids123.AbstractController;
import edu.bu.cs673.superkids123.AbstractFrame;
import edu.bu.cs673.superkids123.common.DataObjectAccess.ChildManager;
import edu.bu.cs673.superkids123.common.model.Child;
import edu.bu.cs673.superkids123.parents.DataObjectAccess.ParentSystemManager;

public class ChildProfileController extends AbstractController {

	public ChildProfileController(AbstractFrame mainFrame) {
		super(mainFrame);
	}

	public void updateAvatar(String imageFileName) {
		Child child = (Child) authController.getCurrentUser();

		child.setImage(ParentSystemManager.getImageByFileName(imageFileName));
		
		ChildManager.updateChild(child);
	}
}
